<template>
    <BasePanel width="208px" height="100%" title="碳排放">
        <template #default>
            <div class="panel-content">
                <div class="img">
                    <img :src="img" alt="" />
                </div>
                <div class="label">杭州市全社会碳排放量</div>
                <div class="value-box">
                    <span class="value">{{ value }}</span>
                    <span class="unit">万吨CO2</span>
                </div>
            </div>
        </template>
    </BasePanel>
</template>

<script setup lang="ts">
import BasePanel from '@/components/BasePanel/index.vue'
// import { useGlobalStore } from '@/store/global'
import { getFpiAssetsFile } from '@/utils/tools'

// 全局数据
// const globalStore = useGlobalStore()

// 图片
const img = getFpiAssetsFile('global/card-icon-3.png')

// 值
const value = ref(1373.83)
</script>

<style lang="scss" scoped>
.panel-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    .img {
        height: 56px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        user-select: none;

        > img {
            height: 100%;
        }
    }

    .label {
        white-space: nowrap;
        font-size: 18px;
        height: 18px;
        line-height: 18px;
        font-weight: bolder;
    }

    .value-box {
        display: flex;
        align-items: flex-end;
        gap: 4px;

        .value {
            font-size: 28px;
            font-weight: 400;
            line-height: 28px;
            height: 28px;
            color: rgba(1, 254, 133, 1);
            font-family: Oswald;
        }

        .unit {
            font-size: 16px;
            font-weight: 700;
            line-height: 16px;
            height: 16px;
            color: rgba(255, 255, 255, 1);
        }
    }
}
</style>
